package model.colorled.sequential;

import model.common.ColorLED;
import framework.common.DeviceRequest;
import framework.common.SensorRequest;
import framework.sequential.Client;

public class ColorLEDClient extends Client implements ColorLED {

	public ColorLEDClient(String user) {
		super(user);
	}

	public void setRed(int red) {
		DeviceRequest req = new DeviceRequest(this);
		req.add(new SensorRequest(SensorRequest.SET, "Red",Integer.valueOf(red)));
		request(req);
	}

	public void setGreen(int green) {
		DeviceRequest req = new DeviceRequest(this);
		req.add(new SensorRequest(SensorRequest.SET, "Green",Integer.valueOf(green)));
		request(req);
	}

	public void setBlue(int blue) {
		DeviceRequest req = new DeviceRequest(this);
		req.add(new SensorRequest(SensorRequest.SET, "Blue",Integer.valueOf(blue)));
		request(req);
	}

	public void setColor(int red, int green, int blue) {
		DeviceRequest req = new DeviceRequest(this);
		req.add(new SensorRequest(SensorRequest.SET, "Red",Integer.valueOf(red)));
		req.add(new SensorRequest(SensorRequest.SET, "Green",Integer.valueOf(green)));
		req.add(new SensorRequest(SensorRequest.SET, "Blue",Integer.valueOf(blue)));
		request(req);
	}
}
